//package com.fxz.oauth.security.userdetails;
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.fxz.oauth.domain.User;
//import com.fxz.oauth.service.IUserService;
//import lombok.AllArgsConstructor;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.stereotype.Service;
//
///**
// * @author Fxz
// * @version 1.0
// * @date 2021-08-04 10:22
// */
//@Service
//@AllArgsConstructor
//public class UserDetailsServiceImpl implements UserDetailsService {
//
//    private final IUserService userService;
//
//    /**
//     * 根据用户名查询出用户信息
//     * @param s
//     * @return
//     * @throws UsernameNotFoundException
//     */
//    @Override
//    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
//        return userService.getOne(new LambdaQueryWrapper<User>().eq(User::getUsername, s));
//    }
//}
